package com.sun.tool.common;

/**
 * @Auther: Sunql
 * @Date: 2018/6/11 16:28
 * @Description:
 */
public class Result {

    // 返回码
    private Integer code;

    // 返回信息
    private String msg;

    // 返回结果
    private Object data;

    public Result() {
    }

    public Result(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Result(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }



    public static Result getResult(Integer code, String msg, Object data){
        return new Result(code,msg,data);
    }

    public static Result getResult(Integer code, String msg){
        return new Result(code,msg);
    }
}
